<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>入库信息</title>
    <link rel="shortcut icon" type="image/x-icon" href="/img/favicon.ico">
    <link rel="stylesheet" href="/element-theme/blue/index.css">

    <style type="text/css">
        .el-row{
            display: flex;
            flex-direction: row;
            justify-content: space-between;
        }
    </style>
</head>

<body>
    <div class="data-manage-table">
    <template>
        <!--入库信息查询-->
        <el-form ref="form" :inline="true" style="padding:20px 20px 0 20px;">
            <el-form-item label="入库单据号">
                <el-input placeholder="请输入入库单据号" v-model="searchInBoundInformation.number" id="aaa"></el-input>
            </el-form-item>
            <el-form-item label="入库批次号">
                <el-input placeholder="请输入入库批次号" v-model="searchInBoundInformation.batchNumber"></el-input>
            </el-form-item>
            <el-form-item label="发血单号">
                <el-input placeholder="请输入发血单号" v-model="searchInBoundInformation.bloodNumber"></el-input>
            </el-form-item>
            <el-form-item label="血液来源">
                <el-select v-model="searchInBoundInformation.bloodSource">
                    <el-option v-for="item in bloodSource" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="操作人">
                <el-input placeholder="请输入操作人姓名" v-model="searchInBoundInformation.operator"></el-input>
            </el-form-item>
            <el-form-item label="入库日期">
                <el-date-picker v-model="searchInBoundInformation.dateVal" type="daterange" size="small" format="yyyy-MM-dd"
                                range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
                </el-date-picker>
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="searchInBound">搜索</el-button>
                <el-button type="info" @click="emptySearch">重置</el-button>
                <el-button type="" @click="showAddInbound">入库</el-button>
                <el-button type="" @click="exportExcel()">导出</el-button>
            </el-form-item>
        </el-form>

        <!-- 新增血液入库信息-->
        <el-dialog title="添加入库信息" center :visible.sync="addInVisible" width="760px" @close="cancelInBound">
            <!-- 内容的主体区域 -->
            <el-form ref="form" :model="addInBound" :rules="addFormRules" label-width="120px">
                <!--                    <el-descriptions :content-style="rowCenter" :label-style="rowCenter" class="margin-top" :column="2"-->
                <!--                                     :size="size" border>-->
                <!--                        <el-descriptions-item>-->
                <!--                            <template slot="label" align="center">-->
                <!--                                血站发血单号-->
                <!--                            </template>-->
                <!--                            <el-form-item prop="bloodNumber">-->
                <!--                                <el-input v-model="addInBound.bloodNumber" align="center" style="width: 195px; float: left;" show-word-limit></el-input>-->
                <!--                            </el-form-item>-->
                <!--                        </el-descriptions-item>-->

                <!--                        <el-descriptions-item>-->
                <!--                            <template slot="label" align="center">-->
                <!--                                血装编号条码-->
                <!--                            </template>-->
                <!--                            <el-form-item prop="barcode">-->
                <!--                                <el-input v-model="addInBound.barcode" style="width: 195px; float: left;" show-word-limit></el-input>-->
                <!--                            </el-form-item>-->
                <!--                        </el-descriptions-item>-->

                <!--                        <el-descriptions-item>-->
                <!--                            <template slot="label" align="center">-->
                <!--                                拓展码-->
                <!--                            </template>-->
                <!--                            <el-form-item prop="extendCode">-->
                <!--                                <el-input v-model="addInBound.extendCode" maxlength="18" show-word-limit></el-input>-->
                <!--                            </el-form-item>-->
                <!--                        </el-descriptions-item>-->

                <!--                        <el-descriptions-item>-->
                <!--                            <template slot="label" align="center">-->
                <!--                                血液成分-->
                <!--                            </template>-->
                <!--                            <el-form-item prop="bloodComponent">-->
                <!--                                <el-input v-model="addInBound.bloodComponent" maxlength="18" show-word-limit></el-input>-->
                <!--                            </el-form-item>-->
                <!--                        </el-descriptions-item>-->

                <!--                        <el-descriptions-item>-->
                <!--                            <template slot="label" align="center">-->
                <!--                                规格-->
                <!--                            </template>-->
                <!--                            <el-form-item prop="bloodCount">-->
                <!--                                <el-select v-model="addInBound.bloodMessage.bloodCount" style="width: 195px; float: right;">-->
                <!--                                    <el-option v-for="item in bloodSize" :key="item.code" :label="item.size"-->
                <!--                                               :value="item.code">-->
                <!--                                    </el-option>-->
                <!--                                </el-select>-->
                <!--                            </el-form-item>-->
                <!--                        </el-descriptions-item>-->

                <!--                        <el-descriptions-item>-->
                <!--                            <template slot="label" align="center">-->
                <!--                                ABO血型-->
                <!--                            </template>-->
                <!--                            <el-form-item prop="aboBloodType">-->
                <!--                                <el-input v-model="addInBound.aboBloodType" maxlength="18" show-word-limit></el-input>-->
                <!--                            </el-form-item>-->
                <!--                        </el-descriptions-item>-->

                <!--                        <el-descriptions-item>-->
                <!--                            <template slot="label" align="center">-->
                <!--                                RH血型-->
                <!--                            </template>-->
                <!--                            <el-form-item prop="rhBloodType">-->
                <!--                                <el-input v-model="addInBound.rhBloodType" maxlength="18" show-word-limit></el-input>-->
                <!--                            </el-form-item>-->
                <!--                        </el-descriptions-item>-->

                <!--                        <el-descriptions-item>-->
                <!--                            <template slot="label" align="center">-->
                <!--                                失效时间-->
                <!--                            </template>-->
                <!--                            <el-form-item prop="bloodMessage.failureTime">-->
                <!--                                <el-date-picker v-model="addInBound.bloodMessage.failureTime" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss" style="width: 195px; float: right;">-->
                <!--                                </el-date-picker>-->
                <!--                            </el-form-item>-->
                <!--                        </el-descriptions-item>-->

                <!--                        <el-descriptions-item>-->
                <!--                            <template slot="label" align="center">-->
                <!--                                采集时间-->
                <!--                            </template>-->
                <!--                            <el-form-item prop="collectTime">-->
                <!--                                <el-date-picker v-model="addInBound.bloodMessage.collectTime" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss" style="width: 195px; float: right;">-->
                <!--                                </el-date-picker>-->
                <!--                            </el-form-item>-->
                <!--                        </el-descriptions-item>-->

                <!--                        <el-descriptions-item>-->
                <!--                            <template slot="label" align="center">-->
                <!--                                血液来源-->
                <!--                            </template>-->
                <!--                            <el-form-item prop="bloodSource">-->
                <!--                                <el-select v-model="addInBound.bloodMessage.bloodSource" style="width: 195px; float: right;">-->
                <!--                                    <el-option v-for="item in bloodSource" :key="item.value" :label="item.label"-->
                <!--                                               :value="item.value">-->
                <!--                                    </el-option>-->
                <!--                                </el-select>-->
                <!--                            </el-form-item>-->
                <!--                        </el-descriptions-item>-->

                <!--                        <el-descriptions-item>-->
                <!--                            <template slot="label" align="center">-->
                <!--                                血液ID-->
                <!--                            </template>-->
                <!--                            <el-form-item prop="bloodId">-->
                <!--                                <el-input v-model="addInBound.bloodId" maxlength="18" show-word-limit></el-input>-->
                <!--                            </el-form-item>-->
                <!--                        </el-descriptions-item>-->

                <!--                        <el-descriptions-item>-->
                <!--                            <template slot="label" align="center">-->
                <!--                                入库金额-->
                <!--                            </template>-->
                <!--                            <el-form-item prop="inboundAmount">-->
                <!--                                <el-input v-model="addInBound.inboundAmount" maxlength="18" show-word-limit></el-input>-->
                <!--                            </el-form-item>-->
                <!--                        </el-descriptions-item>-->

                <!--                        <el-descriptions-item>-->
                <!--                            <template slot="label" align="center">-->
                <!--                                血袋位置-->
                <!--                            </template>-->
                <!--                            <el-form-item prop="bloodLocation">-->
                <!--                                <el-select v-model="addInBound.bloodMessage.bloodLocation" style="width: 195px; float: right;">-->
                <!--                                    <el-option v-for="item in bloodLocation" :key="item.code" :label="item.location"-->
                <!--                                               :value="item.code">-->
                <!--                                    </el-option>-->
                <!--                                </el-select>-->
                <!--                            </el-form-item>-->
                <!--                        </el-descriptions-item>-->

                <!--                        <el-descriptions-item>-->
                <!--                            <template slot="label" align="center">-->
                <!--                                血液金额-->
                <!--                            </template>-->
                <!--                            <el-form-item prop="bloodAmount">-->
                <!--                                <el-input v-model="addInBound.bloodAmount" maxlength="18" show-word-limit></el-input>-->
                <!--                            </el-form-item>-->
                <!--                        </el-descriptions-item>-->

                <!--                        <el-descriptions-item>-->
                <!--                            <template slot="label" align="center">-->
                <!--                                操作人-->
                <!--                            </template>-->
                <!--                            <el-form-item prop="operator">-->
                <!--                                <el-input v-model="addInBound.operator" maxlength="18" show-word-limit></el-input>-->
                <!--                            </el-form-item>-->
                <!--                        </el-descriptions-item>-->

                <!--                        <el-descriptions-item>-->
                <!--                            <template slot="label" align="center">-->
                <!--                                操作人工号-->
                <!--                            </template>-->
                <!--                            <el-form-item prop="operatorId">-->
                <!--                                <el-input v-model="addInBound.operatorId" maxlength="18" show-word-limit></el-input>-->
                <!--                            </el-form-item>-->
                <!--                        </el-descriptions-item>-->
                <!--                        -->
                <!--                    </el-descriptions>-->
                <el-row>
                    <el-col :span="11">
                        <el-form-item label="血站发血单号" prop="bloodNumber" :rules="addFormRules.addBloodNumberReview">
                            <el-input v-model="addInBound.bloodNumber" style="width: 195px; float: right;"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="11">
                        <el-form-item label="血装编号条码" prop="bloodMessage.barcode" :rules="addFormRules.addBarCodeReview">
                            <el-input v-model="addInBound.bloodMessage.barcode" style="width: 195px; float: right;"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="11">
                        <el-form-item label="拓展码" prop="bloodMessage.extendCode" :rules="addFormRules.addExtendCodeReview">
                            <el-input v-model="addInBound.bloodMessage.extendCode" style="width: 195px; float: right;"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="11">
                        <el-form-item label="血液成分" prop="bloodMessage.bloodComponent" :rules="addFormRules.addBloodComponentReview">
                            <el-input v-model="addInBound.bloodMessage.bloodComponent" style="width: 195px; float: right;"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="11">
                        <el-form-item label="规格" prop="bloodMessage.bloodCount" :rules="addFormRules.addBloodCountReview">
                            <el-select v-model="addInBound.bloodMessage.bloodCount" style="width: 195px; float: right;">
                                <el-option v-for="item in bloodSize" :key="item.code" :label="item.size"
                                           :value="item.code">
                                </el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :span="11">
                        <el-form-item label="ABO血型" prop="bloodMessage.aboBloodType" :rules="addFormRules.addAboBloodTypeReview">
                            <el-select v-model="addInBound.bloodMessage.aboBloodType" style="width: 195px; float: right;">
                                <el-option v-for="item in aboBloodType" :key="item.code" :label="item.name"
                                           :value="item.code">
                                </el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="11">
                        <el-form-item label="RH血型" prop="bloodMessage.rhBloodType" :rules="addFormRules.addRhBloodTypeReview">
                            <el-select v-model="addInBound.bloodMessage.rhBloodType" style="width: 195px; float: right;">
                                <el-option v-for="item in rhBloodType" :key="item.code" :label="item.name"
                                           :value="item.code">
                                </el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :span="11">
                        <el-form-item label="失效时间" prop="bloodMessage.failureTime" :rules="addFormRules.addFailureTimeReview">
                            <el-date-picker v-model="addInBound.bloodMessage.failureTime" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss" style="width: 195px; float: right;">
                            </el-date-picker>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="11">
                        <el-form-item label="采集时间" prop="bloodMessage.collectTime" :rules="addFormRules.addCollectTimeReview">
                            <el-date-picker v-model="addInBound.bloodMessage.collectTime" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss" style="width: 195px; float: right;">
                            </el-date-picker>
                        </el-form-item>
                    </el-col>
                    <el-col :span="11">
                        <el-form-item label="血液来源" prop="bloodMessage.bloodSource" :rules="addFormRules.addBloodSourceReview">
                            <el-select v-model="addInBound.bloodMessage.bloodSource" style="width: 195px; float: right;">
                                <el-option v-for="item in bloodSource" :key="item.code" :label="item.source"
                                           :value="item.code">
                                </el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="11">
                        <el-form-item label="血液ID" prop="bloodMessage.bloodId" :rules="addFormRules.addBloodIdReview">
                            <el-input v-model="addInBound.bloodMessage.bloodId" style="width: 195px; float: right;"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="11">
                        <el-form-item label="入库金额" prop="bloodMessage.inboundAmount" :rules="addFormRules.addInboundAmountReview">
                            <el-input v-model="addInBound.bloodMessage.inboundAmount" style="width: 195px; float: right;"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="11">
                        <el-form-item label="血袋位置" prop="bloodMessage.bloodLocation" :rules="addFormRules.addBloodLocationReview">
                            <el-select v-model="addInBound.bloodMessage.bloodLocation" style="width: 195px; float: right;">
                                <el-option v-for="item in bloodLocation" :key="item.code" :label="item.location"
                                           :value="item.code">
                                </el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :span="11">
                        <el-form-item label="血液金额" prop="bloodMessage.bloodAmount" :rules="addFormRules.addBloodAmountReview">
                            <el-input v-model="addInBound.bloodMessage.bloodAmount" style="width: 195px; float: right;"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="11">
                        <el-form-item label="操作人" prop="username">
                            <el-input readonly v-model="user.username" style="width: 195px; float: right;"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="11">
                        <el-form-item label="操作人工号" prop="jobnum">
                            <el-input readonly v-model="user.jobnum" style="width: 195px; float: right;"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
            </el-form>

            <!-- 底部区域 -->
            <span slot="footer" class="dialog-footer">
                    <el-button @click="cancelInBound">取 消</el-button>
                    <el-button type="primary" @click="addBlood()">确 定</el-button>
                </span>
        </el-dialog>

        <!--查看血液信息-->
        <el-dialog title="血液信息" center :visible.sync="bloodVisible" width="800px" @close="cancelViewBlood">
            <!-- 内容的主体区域 -->
            <el-descriptions   :content-style="rowCenter" :label-style="rowCenter" class="margin-top"  :column="2"  :size="size" border>
                <el-descriptions-item>
                    <template slot="label" align="center" >
                        血液ID
                    </template>
                    {{ bloodInformation.bloodId }}
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label" align="center">
                        ABO血型
                    </template>
                    {{ bloodInformation.aboInfo}}
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label" align="center">
                        RH血型
                    </template>
                    {{ bloodInformation.rhInfo }}
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label" align="center">
                        血装编号条码
                    </template>
                    {{ bloodInformation.barcode }}
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label" align="center">
                        拓展码
                    </template>
                    {{ bloodInformation.extendCode }}
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label" align="center">
                        血液成份
                    </template>
                    {{ bloodInformation.bloodComponent }}
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label" align="center">
                        规格
                    </template>
                    {{ bloodInformation.bloodSizeInfo }}
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label" align="center">
                        失效时间
                    </template>
                    {{ bloodInformation.failureTime }}
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label" align="center">
                        采集时间
                    </template>
                    {{ bloodInformation.collectTime }}
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label" align="center">
                        血液来源
                    </template>
                    {{ bloodInformation.bloodSourceInfo }}
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label" align="center">
                        血袋位置
                    </template>
                    {{ bloodInformation.locationInfo }}
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label" align="center">
                        血液金额
                    </template>
                    {{ bloodInformation.bloodAmount }}
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label" align="center">
                        入库金额
                    </template>
                    {{ bloodInformation.inboundAmount }}
                </el-descriptions-item>

                <el-descriptions-item>
                    <template slot="label" align="center">

                    </template>
                    {{ }}
                </el-descriptions-item>
            </el-descriptions>
        </el-dialog>

        <!-- 血液复核 -->
        <el-dialog title="填写血液复核信息" center :visible.sync="reviewVisible" width="1300px" @close="reviewVisible=false">
            <!-- 内容的主体区域 -->
            <el-form ref="form" :model="reviewBlood" :rules="reviewFormRules" label-width="120px">
                <el-row>
                    <el-col :span="7">
                        <el-form-item label="血液ID" prop="bloodId" >
                            <el-input v-model="bloodInformation.bloodId" :disabled="true" style="width:180px; float: right;"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="7">
                        <el-form-item label="ABO血型" prop="aboInfo" >
                            <el-input v-model="bloodInformation.aboInfo" :disabled="true"  style="width:180px; float: right;"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="7">
                        <el-form-item label="血液ID" prop="bloodMessage.bloodId" :rules="reviewFormRules.bloodIdReview">
                            <el-input v-model="reviewBlood.bloodMessage.bloodId" style="width: 195px; float: right;"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="7">
                        <el-form-item label="ABO血型" prop="bloodMessage.aboBloodType" :rules="reviewFormRules.aboBloodTypeReview">
                            <el-select v-model="reviewBlood.bloodMessage.aboBloodType" style="width: 195px; float: right;">
                                <el-option v-for="item in aboBloodType" :key="item.code" :label="item.name"
                                           :value="item.code">
                                </el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                </el-row>

                <el-row>
                    <el-col :span="7">
                        <el-form-item label="RH血型" prop="rhInfo" >
                            <el-input v-model="bloodInformation.rhInfo" :disabled="true"  style="width:180px; float: right;"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="7">
                        <el-form-item label="血装编号条码" prop="barcode" >
                            <el-input v-model="bloodInformation.barcode" :disabled="true"  style="width:180px; float: right;"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="7">
                        <el-form-item label="RH血型" prop="bloodMessage.rhBloodType" :rules="reviewFormRules.rhBloodTypeReview">
                            <el-select v-model="reviewBlood.bloodMessage.rhBloodType" style="width: 195px; float: right;">
                                <el-option v-for="item in rhBloodType" :key="item.code" :label="item.name"
                                           :value="item.code">
                                </el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :span="7">
                        <el-form-item label="血装编号条码" prop="bloodMessage.barcode" :rules="reviewFormRules.barcodeReview">
                            <el-input v-model="reviewBlood.bloodMessage.barcode" style="width: 195px; float: right;"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>

                <el-row>
                    <el-col :span="7">
                        <el-form-item label="拓展码" prop="extendCode" >
                            <el-input v-model="bloodInformation.extendCode" :disabled="true"  style="width:180px; float: right;"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="7">
                        <el-form-item label="血液成份" prop="bloodComponent" >
                            <el-input v-model="bloodInformation.bloodComponent" :disabled="true"  style="width:180px; float: right;"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="7">
                        <el-form-item label="拓展码" prop="bloodMessage.extendCode" :rules="reviewFormRules.extendCodeReview">
                            <el-input v-model="reviewBlood.bloodMessage.extendCode" style="width: 195px; float: right;"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="7">
                        <el-form-item label="血液成分" prop="bloodMessage.bloodComponent" :rules="reviewFormRules.bloodComponentReview">
                            <el-input v-model="reviewBlood.bloodMessage.bloodComponent" style="width: 195px; float: right;"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>

                <el-row>
                    <el-col :span="7">
                        <el-form-item label="规格" prop="bloodSizeInfo" >
                            <el-input v-model="bloodInformation.bloodSizeInfo" :disabled="true"  style="width:180px; float: right;"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="7">
                        <el-form-item label="失效时间" prop="failureTime" >
                            <el-input v-model="bloodInformation.failureTime" :disabled="true"  style="width:180px; float: right;"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="7">
                        <el-form-item label="规格" prop="bloodMessage.bloodSizeInfo" :rules="reviewFormRules.bloodSizeReview">
                            <el-select v-model="reviewBlood.bloodMessage.bloodSizeInfo" style="width: 195px; float: right;">
                                <el-option v-for="item in bloodSize" :key="item.code" :label="item.size"
                                           :value="item.size">
                                </el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :span="7">
                        <el-form-item label="失效时间" prop="bloodMessage.failureTime" :rules="reviewFormRules.failureTimeReview">
                            <el-date-picker v-model="reviewBlood.bloodMessage.failureTime" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss" style="width: 195px; float: right;">
                            </el-date-picker>
                        </el-form-item>
                    </el-col>
                </el-row>

                <el-row>
                    <el-col :span="7">
                        <el-form-item label="采集时间" prop="collectTime" >
                            <el-input v-model="bloodInformation.collectTime" :disabled="true"  style="width:180px; float: right;"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="7">
                        <el-form-item label="血液来源" prop="bloodSourceInfo" >
                            <el-input v-model="bloodInformation.bloodSourceInfo" :disabled="true"  style="width:180px; float: right;"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="7">
                        <el-form-item label="采集时间" prop="bloodMessage.collectTime" :rules="reviewFormRules.collectTimeReview">
                            <el-date-picker v-model="reviewBlood.bloodMessage.collectTime" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss" style="width: 195px; float: right;">
                            </el-date-picker>
                        </el-form-item>
                    </el-col>
                    <el-col :span="7">
                        <el-form-item label="血液来源" prop="bloodMessage.bloodSource" :rules="reviewFormRules.bloodSourceReview">
                            <el-select v-model="reviewBlood.bloodMessage.bloodSource" style="width: 195px; float: right;">
                                <el-option v-for="item in bloodSource" :key="item.code" :label="item.source"
                                           :value="item.code">
                                </el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                </el-row>

                <el-row>
                    <el-col :span="7">
                        <el-form-item label="血袋位置" prop="locationInfo" >
                            <el-input v-model="bloodInformation.locationInfo" :disabled="true"  style="width:180px; float: right;"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="7">
                        <el-form-item label="血液金额" prop="bloodAmount" >
                            <el-input v-model="bloodInformation.bloodAmount" :disabled="true"  style="width:180px; float: right;"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="7">
                        <el-form-item label="血袋位置" prop="bloodMessage.bloodLocation" :rules="reviewFormRules.bloodLocationReview">
                            <el-select v-model="reviewBlood.bloodMessage.bloodLocation" style="width: 195px; float: right;">
                                <el-option v-for="item in bloodLocation" :key="item.code" :label="item.location"
                                           :value="item.code">
                                </el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :span="7">
                        <el-form-item label="血液金额" prop="bloodMessage.bloodAmount" :rules="reviewFormRules.bloodAmountReview">
                            <el-input v-model="reviewBlood.bloodMessage.bloodAmount" style="width: 195px; float: right;"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>

                <el-row>
                    <el-col :span="7">
                        <el-form-item label="入库金额" prop="inboundAmount" >
                            <el-input v-model="bloodInformation.inboundAmount" :disabled="true"  style="width:180px; float: right;"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="7">
                        <!--                            <el-form-item label="状态" prop="stateInfo" >-->
                        <!--                                <el-input v-model="bloodInformation.stateInfo" readonly  style="width:180px; float: right;"></el-input>-->
                        <!--                            </el-form-item>-->
                    </el-col>
                    <el-col :span="7">
                        <el-form-item label="入库金额" prop="bloodMessage.inboundAmount" :rules="reviewFormRules.inboundAmountReview">
                            <el-input v-model="reviewBlood.bloodMessage.inboundAmount" style="width: 195px; float: right;"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="7">
                        <el-form-item label="复核人工号" prop="reviewerId">
                            <el-input v-model="reviewBlood.reviewerId" style="width: 195px; float: right;"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
            </el-form>
            <!-- 底部区域 -->
            <span slot="footer" class="dialog-footer">
                    <el-button @click="cancelReview">取消入库</el-button>
                    <el-button type="primary" @click="confirmReview">确定入库</el-button>
                </span>
        </el-dialog>
        
        <!--血液入库信息展示-->
        <el-table :data="bloodInBoundInformation" style="width: 100%" border
                  :header-cell-style="{'text-align': 'center','background': '#eef1f6'}" highlight-current-row
                  @current-change="" id="out-table">
            <el-table-column type="selection" width="55" align="center"></el-table-column>

            <el-table-column prop="stateInfo" label="状态" min-width="10%" align="center">
            </el-table-column>

            <el-table-column prop="number" label="入库单据号" min-width="10%" align="center">
            </el-table-column>

            <el-table-column prop="batchNumber" label="入库批次号" min-width="10%" align="center">
            </el-table-column>

            <el-table-column label="入库日期" min-width="10%" align="center">
                <template slot-scope="scope">
                    <i class="el-icon-time"></i>
                    <span style="margin-left: 10px">{{scope.row.inboundTime}}</span>
                </template>
            </el-table-column>

            <el-table-column prop="bloodNumber" label="发血单号" min-width="10%" align="center">
            </el-table-column>

            <el-table-column prop="bloodSource" label="血液来源" min-width="10%" align="center">
            </el-table-column>

            <el-table-column prop="operator" label="操作人" min-width="10%" align="center">
            </el-table-column>

            <el-table-column label="操作" min-width="10%" align="center">
                <template slot-scope="scope">
                    <el-button size="mini" type="primary" @click="clickViewBloodInformation(scope.$index, scope.row)">查看</el-button>
                    <el-button size="mini" type="primary" @click="reviewInBound(scope.$index, scope.row)" :disabled="scope.row.stateInfo!='入库等待审核'">复核</el-button>
                </template>
            </el-table-column>
        </el-table>

        <!--            <el-pagination :page-size="pageSize" :total="total" :current-page.sync="current" layout="prev, pager, next, jumper"-->
        <!--                class="pagination"  @current-change="handleCurrentChange" style="text-align: center; margin-top: 20px;" />-->
        <el-pagination
                @size-change="handleSizeChange"
                @current-change="handleCurrentChange"
                :current-page.sync="current"
                :page-sizes="[1, 5, 10, 20]"
                :page-size.sync="pageSize"
                layout="total, sizes, prev, pager, next, jumper"
                :total="total"
                class="pagination"
                style="text-align: center; margin-top: 20px;">
        </el-pagination>
    </template>
</div>

    <script src="/plugins/vue-2.5.17/vue.js"></script>
    <script src="/js/2.15.12/index.js"></script>
    <link href="/css/2.15.12/index.min.css" rel="stylesheet">
    <script src="/plugins/element-2.4.5/index.js"></script>
    <script src="/icons/iconfont.js"></script>
    <script src="/js/axios.min.js"></script>
    <script>Vue.prototype.$ELEMENT = { size: 'medium' };</script>
    <script language="JavaScript" type="text/javascript">
        //Date原型上添加格式转换方法
        Date.prototype.format = function(fmt) {
            const o = {
                "M+": this.getMonth() + 1,                 //月份 
                "d+": this.getDate(),                    //日 
                "h+": this.getHours(),                   //小时 
                "m+": this.getMinutes(),                 //分 
                "s+": this.getSeconds(),                 //秒 
                "q+": Math.floor((this.getMonth() + 3) / 3), //季度 
                "S": this.getMilliseconds()             //毫秒 
            };
            if(/(y+)/.test(fmt)) {
                fmt=fmt.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length));
            }
            for(const k in o) {
                if(new RegExp("("+ k +")").test(fmt)){
                    fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));
                }
            }
            return fmt;
        }
    </script>
    <script>
        (function () {
            const vm = window.vm = new Vue({
                el: '.data-manage-table',
                data() {

                    //复核规则
                    const validateBloodId = (rule, value, callback) => {
                        if (value == '') {
                            callback(new Error('血液ID不可以为空'))
                        } else if (value != this.bloodInformation.bloodId) {
                            callback(new Error('与登记的血液ID不一致'))
                        } else {
                            callback()
                        }
                    }
                    const validateBatchNumber = (rule, value, callback) => {
                        if (value == '') {
                            callback(new Error('入库批次号不可以为空'))
                        } else if (value != this.batchNumber) {
                            callback(new Error('与登记的入库批次号不一致'))
                        } else {
                            callback()
                        }
                    }
                    const validateBloodNumber = (rule, value, callback) => {
                        if (value == '') {
                            callback(new Error('血站发血单号不可以为空'))
                        } else if (value != this.bloodNumber) {
                            callback(new Error('与登记的血站发血单号不一致'))
                        } else {
                            callback()
                        }
                    }
                    const validateBarCode = (rule, value, callback) => {
                        if (value == '') {
                            callback(new Error('血装编号条码不可以为空'))
                        } else if (value != this.bloodInformation.barcode) {
                            callback(new Error('与登记的血装编号条码不一致'))
                        } else {
                            callback()
                        }
                    }
                    const validateExtendCode = (rule, value, callback) => {
                        if (value == '') {
                            callback(new Error('拓展码不可以为空'))
                        } else if (value != this.bloodInformation.extendCode) {
                            callback(new Error('与登记的拓展码不一致'))
                        } else {
                            callback()
                        }
                    }
                    const validateBloodComponent = (rule, value, callback) => {
                        if (value == '') {
                            callback(new Error('血液成分不可以为空'))
                        } else if (value != this.bloodInformation.bloodComponent) {
                            callback(new Error('与登记的血液成分不一致'))
                        } else {
                            callback()
                        }
                    }
                    const validateBloodSize = (rule, value, callback) => {
                        if (value == '') {
                            callback(new Error('规格不可以为空'))
                        } else if (value != this.bloodInformation.bloodSizeInfo) {
                            callback(new Error('与登记的规格不一致'))
                        } else {
                            callback()
                        }
                    }
                    const validateAboBloodType = (rule, value, callback) => {
                        if (value == '') {
                            callback(new Error('ABO血型不可以为空'))
                        } else if (value != this.bloodInformation.aboBloodType) {
                            callback(new Error('与登记的ABO血型不一致'))
                        } else {
                            callback()
                        }
                    }
                    const validateRhBloodType = (rule, value, callback) => {
                        if (value == '') {
                            callback(new Error('RH血型不可以为空'))
                        } else if (value != this.bloodInformation.rhBloodType) {
                            callback(new Error('与登记的RH血型不一致'))
                        } else {
                            callback()
                        }
                    }
                    const validateFailureTime = (rule, value, callback) => {
                        if (value == '') {
                            callback(new Error('失效时间不可以为空'))
                        } else if (value != this.bloodInformation.failureTime) {
                            callback(new Error('与登记的失效时间不一致'))
                        } else {
                            callback()
                        }
                    }
                    const validateCollectTime = (rule, value, callback) => {
                        if (value == '') {
                            callback(new Error('采集时间不可以为空'))
                        } else if (value != this.bloodInformation.collectTime) {
                            callback(new Error('与登记的采集时间不一致'))
                        } else {
                            callback()
                        }
                    }
                    const validateBloodSource = (rule, value, callback) => {
                        if (value == '') {
                            callback(new Error('血液来源不可以为空'))
                        } else if (value != this.bloodInformation.bloodSource) {
                            callback(new Error('与登记的血液来源不一致'))
                        } else {
                            callback()
                        }
                    }
                    const validateInboundAmount = (rule, value, callback) => {
                        if (value == '') {
                            callback(new Error('入库金额不可以为空'))
                        } else if (value != this.bloodInformation.inboundAmount) {
                            callback(new Error('与登记的入库金额不一致'))
                        } else {
                            callback()
                        }
                    }
                    const validateBloodLocation = (rule, value, callback) => {
                        if (value == '') {
                            callback(new Error('血袋位置不可以为空'))
                        } else if (value != this.bloodInformation.bloodLocation) {
                            callback(new Error('与登记的血袋位置不一致'))
                        } else {
                            callback()
                        }
                    }
                    const validateBloodAmount = (rule, value, callback) => {
                        if (value == '') {
                            callback(new Error('血液金额不可以为空'))
                        } else if (value != this.bloodInformation.bloodAmount) {
                            callback(new Error('与登记的血液金额不一致'))
                        } else {
                            callback()
                        }
                    }
                    const validateOperator = (rule, value, callback) => {
                        if (value == '') {
                            callback(new Error('操作者不可以为空'))
                        } else if (value != this.bloodInformation.operator) {
                            callback(new Error('与登记的操作者不一致'))
                        } else {
                            callback()
                        }
                    }


                    //入库信息登记规则
                    const validateAddBloodNumber = (rule, value, callback) => {
                        if (value == '') {
                            callback(new Error('血站发血单号不可以为空'))
                        }
                    }
                    const validateAddBarCode = (rule, value, callback) => {
                        if (value == '') {
                            callback(new Error('血装编号条码不可以为空'))
                        }
                    }
                    const validateAddExtendCode = (rule, value, callback) => {
                        if (value == '') {
                            callback(new Error('拓展码不可以为空'))
                        }
                    }
                    const validateAddBloodComponent = (rule, value, callback) => {
                        if (value == '') {
                            callback(new Error('血液成分不可以为空'))
                        }
                    }
                    const validateAddBloodCount = (rule, value, callback) => {
                        if (value == '') {
                            callback(new Error('血液规格不可以为空'))
                        }
                    }
                    const validateAddAboBloodType = (rule, value, callback) => {
                        if (value == '') {
                            callback(new Error('ABO血型不可以为空'))
                        }
                    }
                    const validateAddRhBloodType = (rule, value, callback) => {
                        if (value == '') {
                            callback(new Error('RH血型不可以为空'))
                        }
                    }
                    const validateAddFailureTime = (rule, value, callback) => {
                        if (value == '') {
                            callback(new Error('失效时间不可以为空'))
                        }
                    }
                    const validateAddCollectTime = (rule, value, callback) => {
                        if (value == '') {
                            callback(new Error('采集时间不可以为空'))
                        }
                    }
                    const validateAddBloodSource = (rule, value, callback) => {
                        if (value == '') {
                            callback(new Error('血液来源不可以为空'))
                        }
                    }
                    const validateAddBloodId = (rule, value, callback) => {
                        if (value == '') {
                            callback(new Error('血液ID不可以为空'))
                        }
                    }
                    const validateAddInboundAmount = (rule, value, callback) => {
                        if (value == '') {
                            callback(new Error('入库金额不可以为空'))
                        }
                    }
                    const validateAddBloodLocation = (rule, value, callback) => {
                        if (value == '') {
                            callback(new Error('血袋位置不可以为空'))
                        }
                    }
                    const validateAddBloodAmount = (rule, value, callback) => {
                        if (value == '') {
                            callback(new Error('血液金额不可以为空'))
                        }
                    }


                    return {
                        rowCenter:{
                            "text-align":"center"
                        },

                        size:'',

                        inboundId: '',  //入库id

                        //入库验证
                        addFormRules: {
                            addBloodNumberReview: [{validator: validateAddBloodNumber, trigger: 'blur'}],
                            addBarCodeReview: [{validator: validateAddBarCode, trigger: 'blur'}],
                            addExtendCodeReview: [{validator: validateAddExtendCode, trigger: 'blur'}],
                            addBloodComponentReview: [{validator: validateAddBloodComponent, trigger: 'blur'}],
                            addBloodCountReview: [{validator: validateAddBloodCount, trigger: ['blur', 'change']}],
                            addAboBloodTypeReview: [{validator: validateAddAboBloodType, trigger: ['blur', 'change']}],
                            addRhBloodTypeReview: [{validator: validateAddRhBloodType, trigger: ['blur', 'change']}],
                            addFailureTimeReview: [{validator: validateAddFailureTime, trigger: 'blur'}],
                            addCollectTimeReview: [{validator: validateAddCollectTime, trigger: 'blur'}],
                            addBloodSourceReview: [{validator: validateAddBloodSource, trigger: ['blur', 'change']}],
                            addBloodIdReview: [{validator: validateAddBloodId, trigger: 'blur'}],
                            addInboundAmountReview: [{validator: validateAddInboundAmount, trigger: 'blur'}],
                            addBloodLocationReview: [{validator: validateAddBloodLocation, trigger: ['blur', 'change']}],
                            addBloodAmountReview: [{validator: validateAddBloodAmount, trigger: 'blur'}],
                        },

                        //复核样本表单验证
                        reviewFormRules: {
                            bloodIdReview: [{validator: validateBloodId, trigger: 'blur'}],
                            batchNumberReview: [{validator: validateBatchNumber, trigger: 'blur'}],
                            bloodNumberReview: [{validator: validateBloodNumber, trigger: 'blur'}],
                            barcodeReview: [{validator: validateBarCode, trigger: 'blur'}],
                            extendCodeReview: [{validator: validateExtendCode, trigger: 'blur'}],
                            bloodComponentReview: [{validator: validateBloodComponent, trigger: 'blur'}],
                            bloodSizeReview: [{validator: validateBloodSize, trigger: ['blur', 'change']}],
                            aboBloodTypeReview: [{validator: validateAboBloodType, trigger: ['blur', 'change']}],
                            rhBloodTypeReview: [{validator: validateRhBloodType, trigger: ['blur', 'change']}],
                            failureTimeReview: [{validator: validateFailureTime, trigger: 'blur'}],
                            collectTimeReview: [{validator: validateCollectTime, trigger: 'blur'}],
                            bloodSourceReview: [{validator: validateBloodSource, trigger: ['blur', 'change']}],
                            inboundAmountReview: [{validator: validateInboundAmount, trigger: 'blur'}],
                            bloodLocationReview: [{validator: validateBloodLocation, trigger: ['blur', 'change']}],
                            bloodAmountReview: [{validator: validateBloodAmount, trigger: 'blur'}],
                            operatorReview: [{validator: validateOperator, trigger: 'blur'}],
                        },
                        
                        total: 0,   //总记录数
                        current: 1,     //当前页
                        pageSize: 5,      //每页记录数
                        pages: 0,       //总页数

                        user: {
                            "username": "",
                            "jobnum": "",
                        },

                        labelPosition: 'right',
                        addInVisible: false,   //新增血液入库弹出框显示
                        bloodVisible: false,    //查看血液信息
                        reviewVisible: false,    //血液复核窗口

                        //ABO血型
                        aboBloodType : [],

                        rhBloodType: [],

                        bloodSize: [],

                        //血液状态选择
                        state: [
                            {
                                label: '入库',
                                value: '入库'
                            },
                            {
                                label: '在库',
                                value: '在库'
                            },
                            {
                                label: '已出库',
                                value: '已出库'
                            },
                            {
                                label: '已分配',
                                value: '已分配'
                            },
                            {
                                label: '废弃申请',
                                value: '废弃申请'
                            },
                            {
                                label: '患者退血中',
                                value: '患者退血中'
                            },
                            {
                                label: '血库退血中',
                                value: '血库退血中'
                            },
                            {
                                label: '取消入库',
                                value: '取消入库'
                            },
                            {
                                label: '血站退血中',
                                value: '血站退血中'
                            },
                            {
                                label: '配血',
                                value: '配血'
                            },
                            {
                                label: '待抽取血',
                                value: '待抽取血'
                            },
                            {
                                label: '已抽取血',
                                value: '已抽取血'
                            },
                            {
                                label: '血液加工',
                                value: '血液加工'
                            },
                        ],

                        //血液位置
                        bloodLocation: [
                            {
                                label: '血站',
                                value: '血站'
                            },
                            {
                                label: '血库',
                                value: '血库'
                            },
                        ],

                        //血液来源选择
                        bloodSource: [
                            {
                                label: '血站',
                                value: '血站'
                            },
                            {
                                label: '医院',
                                value: '医院'
                            }
                        ],

                        //搜索血液信息
                        searchInBoundInformation: {
                            number: '',     //入库单据号
                            batchNumber: '',    //入库批次号
                            bloodNumber: '',       //血站发血编号
                            bloodSource: '',    //血液来源
                            operator: '',   //操作人姓名
                            dateVal: [],    //入库日期
                        },

                        //查询到的血液入库信息
                        bloodInBoundInformation: [],

                        //查看血液信息
                        bloodInformation: {},

                        //新增血液信息
                        addInBound: {
                            number: '',     //入库单据号
                            batchNumber: '',    //入库批次号
                            bloodNumber: '',    //血站发血单号
                            // serialNumber: '',   //自编流水号
                            bloodSource: '',    //血液来源 复用
                            // inboundTime: '',    //入库时间
                            bloodId: '',        //血液信息的ID
                            bloodMessage: {
                                barcode: '',    //血装编号条码
                                extendCode: '',     //拓展码
                                bloodComponent: '', //血液成分
                                bloodCount: '',  //规格
                                aboBloodType: '',    //ABO血型
                                rhBloodType: '',     //RH血型
                                failureTime: '',    //失效时间
                                collectTime: '',    //采集时间
                                bloodSource: '',    //血液来源
                                state: '',      //血液状态
                                inboundAmount: '', //入库金额
                                bloodId: '',     //血液ID
                                bloodLocation: '',      //血液位置
                                bloodAmount: '',    //血液金额
                                bloodId: '',        //血液ID
                            },
                            operator: '',      //操作人
                            operatorId: '',     //操作人工号
                            bloodMoney: '',     //血液金额 复用
                        },

                        //血液复核信息
                        reviewBlood: {
                            number: '',     //入库单据号
                            batchNumber: '',    //入库批次号
                            bloodNumber: '',    //血站发血单号
                            // serialNumber: '',   //自编流水号
                            bloodSource: '',    //血液来源 复用
                            // inboundTime: '',    //入库时间
                            bloodMessage: {
                                barcode: '',    //血装编号条码
                                extendCode: '',     //拓展码
                                bloodComponent: '', //血液成分
                                bloodCount: '',  //规格
                                aboBloodType: '',    //ABO血型
                                rhBloodType: '',     //RH血型
                                failureTime: '',    //失效时间
                                collectTime: '',    //采集时间
                                bloodSource: '',    //血液来源
                                state: '入库',      //血液状态
                                inboundAmount: '', //入库金额
                                bloodNumber: '',     //血液ID
                                bloodLocation: '',      //血液位置
                                bloodAmount: '',    //血液金额
                                bloodId: '',        //血液ID
                            },
                            operator: '',      //操作人
                            bloodMoney: '',     //血液金额 复用
                        },

                    }
                },

                computed: {

                },

                watch: {
                    'addInBound.bloodMessage.bloodSource': function (newValue) {
                        this.addInBound.bloodSource = newValue
                    },

                    'addInBound.bloodMessage.bloodAmount': function (newValue) {
                        this.addInBound.bloodMoney = newValue
                    },
                    'addInBound.bloodMessage.bloodId': function (newValue) {
                        this.addInBound.bloodId = newValue
                    }
                },

                methods: {
                    handleSizeChange(val) {
                        this.current = 1
                        this.pageSize = val
                        this.searchInBound()
                    },

                    //点击页码
                    handleCurrentChange: function (val) {
                        this.searchInBound()
                    },

                    //获取AboType和RhType
                    getInformation: function(val) {
                        //获取AboType
                        axios({
                            url: '/aboType/normal/query',
                            method: 'get',
                            params: {},
                        }).then(res => {
                            if (res.status == 200) {
                                this.aboBloodType = res.data
                            }
                        }).catch(err => {

                        })

                        //获取RhType
                        axios({
                            url: '/rhType/normal/query',
                            method: 'get',
                            params: {},
                        }).then(res => {
                            if (res.status == 200) {
                                this.rhBloodType = res.data
                            }
                        }).catch(err => {

                        })

                        //获取血液位置
                        axios({
                            url: '/bloodLocation/normal/query',
                            method: 'get',
                            params: {},
                        }).then(res => {
                            if (res.status == 200) {
                                this.bloodLocation = res.data
                            }
                        }).catch(err => {

                        })

                        //获取规格
                        axios({
                            url: '/bloodSize/normal/query',
                            method: 'get',
                            params: {},
                        }).then(res => {
                            if (res.status == 200) {
                                this.bloodSize = res.data
                            }
                        }).catch(err => {

                        })
                        
                        //获取血液来源
                        axios({
                            url: '/bloodSource/normal/getName',
                            method: 'get',
                            params: {},
                        }).then(res => {
                            if (res.status == 200) {
                                this.bloodSource = res.data.data
                            }
                        }).catch(err => {

                        })
                    },

                    //点击”入库按钮“
                    showAddInbound() {
                        this.addInVisible = true
                        this.addInBound.operator = "张三"
                        this.addInBound.operatorId = "111"
                    },

                    //根据查询条件查询入库信息
                    searchInBound() {
                        //入库单据号
                        let number = this.searchInBoundInformation.number
                        //入库批次号
                        let batchNumber = this.searchInBoundInformation.batchNumber
                        //血站发血编号
                        let bloodNumber = this.searchInBoundInformation.bloodNumber
                        //血液来源
                        let bloodSource = this.searchInBoundInformation.bloodSource
                        //操作员
                        let operator = this.searchInBoundInformation.operator
                        //日期范围
                        let dateVal = this.searchInBoundInformation.dateVal
                        //日期格式转换
                        for (let i = 0; i < dateVal.length; i++) {
                            if(dateVal[i] instanceof Date)
                                dateVal[i] = dateVal[i].format("yyyy-MM-dd")
                        }
                        let startTime = dateVal[0]
                        let endTime = dateVal[1]

                        axios({
                            url: '/bloodInBound/normal/searchBloodInBound',
                            method: 'get',
                            params: {
                                number: number,
                                batchNumber: batchNumber,
                                bloodNumber: bloodNumber,
                                bloodSource: bloodSource,
                                operator: operator,
                                startTime: startTime != null ? startTime : '',
                                endTime: endTime != null ? endTime : '',
                                currentPage: this.current,
                                pageSize: this.pageSize
                            },
                        }).then(res => {
                            if (res.status == '200') {
                                this.bloodInBoundInformation = res.data.data;
                                for (let i = 0; i < this.bloodInBoundInformation.length; i++) {
                                    this.bloodInBoundInformation[i].bloodMessage = JSON.parse( this.bloodInBoundInformation[i].bloodMessage)
                                }
                                // console.log(this.bloodInBoundInformation)
                                this.total = res.data.total;
                                this.pages = res.data.pages;
                            } else {
                                this.$notify({
                                    tile: '警告',
                                    message: '搜索出错',
                                    type: 'warning'
                                })
                            }
                        }).catch(err => {
                            this.$notify.error({
                                title: '错误',
                                message: '搜索失败',
                            })
                        })

                    },

                    //清空搜索条件
                    emptySearch() {
                        for (const key in this.searchInBoundInformation)
                            this.searchInBoundInformation[key] = ""
                    },

                    //添加入库信息
                    addBlood() {
                        if (!this.verifyAddBlood(this.addInBound)) {
                            this.$notify({
                                tile: '警告',
                                message: '请填写完整的入库信息',
                                type: 'error'
                            })
                        } else {
                            axios({
                                url: '/bloodInBound/normal/addBloodInBound',
                                method: 'post',
                                data: {
                                    addInBound: this.addInBound,
                                    bloodMessage: this.addInBound.bloodMessage
                                }
                            }).then(res => {
                                if (res.data.code == '200') {
                                    this.$notify({
                                        tile: '成功',
                                        message: '登记成功',
                                        type: 'success'
                                    })
                                    this.addInVisible = false
                                    this.searchInBound()
                                } else {
                                    this.$notify({
                                        tile: '警告',
                                        message: '更新出错',
                                        type: 'warning'
                                    })
                                }
                            }).catch(err => {
                                this.$notify.error({
                                    title: '错误',
                                    message: '更新失败',
                                })
                            })
                        }
                    },

                    //点击查看按钮
                    clickViewBloodInformation(index, row) {
                        this.inboundId = row.id
                        this.bloodVisible = true
                        this.getBloodInformation(index,row)
                    },

                    //查看血液信息
                    getBloodInformation(index, row) {
                        // this.bloodInformation = row.bloodMessage
                        let bloodId = row.bloodId
                        axios({
                            url: '/bloodInBound/normal/getBloodInformation',
                            method: 'get',
                            params: {
                                bloodId: bloodId
                            }
                        }).then(res => {
                            if (res.data.code == '200') {
                                this.bloodInformation = res.data.data
                                // this.bloodVisible = true

                                // this.$notify({
                                //     tile: '成功',
                                //     message: '登记成功',
                                //     type: 'success'
                                // })
                            } else {
                                this.$notify({
                                    tile: '警告',
                                    message: '更新出错',
                                    type: 'warning'
                                })
                            }
                        }).catch(err => {
                            this.$notify.error({
                                title: '错误',
                                message: '更新失败',
                            })
                        })
                    },


                    //新增血液信息检查
                    verifyAddBlood(addInBound){
                        return (
                            (addInBound.bloodMessage.bloodNumber != '') &&
                            (addInBound.bloodMessage.barcode != '') &&
                            (addInBound.bloodMessage.extendCode != '')&&
                            (addInBound.bloodMessage.bloodComponent != '') &&
                            (addInBound.bloodMessage.bloodCount != '') &&
                            (addInBound.bloodMessage.aboBloodType != '') &&
                            (addInBound.bloodMessage.rhBloodType != '') &&
                            (addInBound.bloodMessage.failureTime != '') &&
                            (addInBound.bloodMessage.collectTime != '') &&
                            (addInBound.bloodMessage.bloodSource != '') &&
                            (addInBound.bloodMessage.bloodId != '') &&
                            (addInBound.bloodMessage.inboundAmount != '') &&
                            (addInBound.bloodMessage.bloodLocation != '') &&
                            (addInBound.bloodMessage.bloodAmount != '') &&
                            (addInBound.operator != '') &&
                            (addInBound.operatorId != '')

                        )
                    },

                    //对比复核信息，一致为true，否则为false
                    verifyReviewBlood(bloodInformation, reviewBlood) {
                        // console.log('number ' + (bloodInformation.number == reviewBlood.number))
                        // console.log('batchNumber ' + (bloodInformation.batchNumber == reviewBlood.batchNumber))
                        // console.log('bloodNumber ' + (bloodInformation.bloodNumber == reviewBlood.bloodNumber))
                        // console.log('barcode ' + (bloodInformation.bloodMessage.barcode == reviewBlood.bloodMessage.barcode))
                        // console.log('extendCode ' + (bloodInformation.bloodMessage.extendCode == reviewBlood.bloodMessage.extendCode))
                        // console.log('bloodComponent ' + (bloodInformation.bloodMessage.bloodComponent == reviewBlood.bloodMessage.bloodComponent))
                        // console.log('specification ' + (bloodInformation.bloodMessage.specification == reviewBlood.bloodMessage.specification))
                        // console.log('aboBloodType ' + (bloodInformation.bloodMessage.aboBloodType == reviewBlood.bloodMessage.aboBloodType))
                        // console.log('rhBloodType ' + (bloodInformation.bloodMessage.rhBloodType == reviewBlood.bloodMessage.rhBloodType))
                        // console.log('failureTime ' + (bloodInformation.bloodMessage.failureTime == reviewBlood.bloodMessage.failureTime))
                        // console.log('collectTime ' + (bloodInformation.bloodMessage.collectTime == reviewBlood.bloodMessage.collectTime))
                        // console.log('bloodSource ' + (bloodInformation.bloodMessage.bloodSource == reviewBlood.bloodMessage.bloodSource))
                        // console.log('operator ' + (bloodInformation.operator == reviewBlood.operator))
                        // console.log('inboundAmount ' + (bloodInformation.bloodMessage.inboundAmount == reviewBlood.bloodMessage.inboundAmount))
                        // console.log('bloodLocation ' + (bloodInformation.bloodMessage.bloodLocation == reviewBlood.bloodMessage.bloodLocation))
                        // console.log('bloodAmount ' + (bloodInformation.bloodMessage.bloodAmount == reviewBlood.bloodMessage.bloodAmount))

                        return (
                            // (bloodInformation.number == reviewBlood.number) &&
                            // (bloodInformation.batchNumber == reviewBlood.batchNumber) &&
                            (bloodInformation.bloodId == reviewBlood.bloodMessage.bloodId) &&
                            (bloodInformation.aboBloodType == reviewBlood.bloodMessage.aboBloodType) &&
                            (bloodInformation.rhBloodType == reviewBlood.bloodMessage.rhBloodType)&&
                            ((bloodInformation.barcode).toString() == reviewBlood.bloodMessage.barcode) &&
                            (bloodInformation.extendCode == reviewBlood.bloodMessage.extendCode) &&
                            (bloodInformation.bloodComponent == reviewBlood.bloodMessage.bloodComponent) &&
                            (bloodInformation.bloodSizeInfo == reviewBlood.bloodMessage.bloodSizeInfo) &&
                            (bloodInformation.failureTime == reviewBlood.bloodMessage.failureTime) &&
                            (bloodInformation.collectTime == reviewBlood.bloodMessage.collectTime) &&
                            (bloodInformation.bloodSource == reviewBlood.bloodMessage.bloodSource) &&
                            // (bloodInformation.operator == reviewBlood.operator) &&
                            (bloodInformation.bloodLocation == reviewBlood.bloodMessage.bloodLocation) &&
                            ((bloodInformation.bloodAmount).toString() == reviewBlood.bloodMessage.bloodAmount) &&
                            ((bloodInformation.inboundAmount).toString() == reviewBlood.bloodMessage.inboundAmount)

                        )
                    },

                    //弹出血液复核窗口
                    reviewInBound(index, row) {
                        // console.log(row)
                        this.inboundId = row.id
                        this.getBloodInformation(index, row)
                        this.reviewVisible = true

                        // this.bloodInformation = row
                        // console.log(this.bloodInformation)
                    },

                    //添加入库信息：取消
                    cancelInBound(){
                        this.addInVisible = false
                        for (const key in this.addInBound) {
                            if (key != 'bloodMessage')
                                this.addInBound[key] = ""
                            else {
                                for (const key in this.addInBound.bloodMessage) {
                                    this.addInBound.bloodMessage[key] = ''
                                }
                            }
                        }
                    },

                    //取消查看血液信息
                    cancelViewBlood(){
                        this.bloodVisible = false
                        // for (const key in this.bloodInformation)
                        //     this.bloodInformation[key] = ""
                    },

                    //复核：取消入库
                    cancelReview(){
                        this.reviewVisible = false
                        let BloodId = this.bloodInformation.id //血液id
                        let InBoundId = this.inboundId    //入库id
                        axios({
                            url: '/bloodInBound/review/cancelBloodInBound',
                            method: 'post',
                            params: {
                                BloodId: BloodId,
                                InBoundId: InBoundId
                            }
                        }).then(res => {
                            if (res.data.code == '200') {
                                this.reviewVisible = false
                                this.$notify({
                                    tile: '成功',
                                    message: '取消入库成功',
                                    type: 'success'
                                })
                            } else {
                                this.$notify({
                                    tile: '警告',
                                    message: '取消入库出错',
                                    type: 'warning'
                                })
                            }
                        }).catch(err => {
                            this.$notify.error({
                                title: '错误',
                                message: '取消入库失败',
                            })
                        })
                        for (const key in this.reviewBlood) {
                            if (key != 'bloodMessage')
                                this.reviewBlood[key] = ""
                            else {
                                for (const key in this.reviewBlood.bloodMessage) {
                                    this.reviewBlood.bloodMessage[key] = ''
                                }
                            }
                        }
                    },

                    //复核：确认
                    confirmReview() {
                        // this.verifyReviewBlood(this.bloodInformation, this.reviewBlood)
                        console.log(this.verifyReviewBlood(this.bloodInformation, this.reviewBlood))
                        if (this.verifyReviewBlood(this.bloodInformation, this.reviewBlood)) {
                            let BloodId = this.bloodInformation.id //血液id
                            let InBoundId = this.inboundId    //入库id
                            axios({
                                url: '/bloodInBound/review/reviewBloodInBound',
                                method: 'post',
                                params: {
                                    BloodId: BloodId,
                                    InBoundId: InBoundId,
                                    reviewerId: this.reviewBlood.reviewerId
                                }
                            }).then(res => {
                                if (res.data.code == '200') {
                                    this.reviewVisible = false
                                    this.$notify({
                                        tile: '成功',
                                        message: '复核成功',
                                        type: 'success'
                                    })
                                    this.searchInBound()
                                } else {
                                    this.$notify({
                                        tile: '警告',
                                        message: '更新出错',
                                        type: 'warning'
                                    })
                                }
                            }).catch(err => {
                                this.$notify.error({
                                    title: '错误',
                                    message: '更新失败',
                                })
                            })
                        } else {
                            this.$notify.error({
                                title: '错误',
                                message: '信息有误，请再次核对',
                            })
                        }
                    },

                    //导出excel
                    exportExcel () {
                        //入库单据号
                        let number = this.searchInBoundInformation.number
                        //入库批次号
                        let batchNumber = this.searchInBoundInformation.batchNumber
                        //血站发血编号
                        let bloodNumber = this.searchInBoundInformation.bloodNumber
                        //血液来源
                        let bloodSource = this.searchInBoundInformation.bloodSource
                        //操作员
                        let operator = this.searchInBoundInformation.operator
                        //日期范围
                        let dateVal = this.searchInBoundInformation.dateVal
                        //日期格式转换
                        if (dateVal.length > 0) {
                            //日期格式转换
                            if(dateVal[0] instanceof Date)
                                dateVal[0] = dateVal[0].format("yyyy-MM-dd")
                            if(dateVal[1] instanceof Date)
                                dateVal[1] = dateVal[1].format("yyyy-MM-dd")
                        }
                        let startTime = dateVal[0] != null ? dateVal[0] : ''
                        let endTime = dateVal[1] != null ? dateVal[1] : ''

                        //创建a标签元素
                        const a = document.createElement('a')
                        a.href = 'http://localhost:8080/bloodInBound/normal/downloadExcel?' + 'number=' + number + '&batchNumber=' + batchNumber + '&bloodNumber=' + bloodNumber + '&bloodSource=' + bloodSource + '&operator=' + operator +'&startTime=' + startTime + '&endTime=' + endTime
                        a.click()
                    }
                },

                mounted() {
                    this.searchInBound()
                    this.getInformation()
                    //获取员工数据
                    this.user = sessionStorage.getItem("user") ? JSON.parse(sessionStorage.getItem("user")) : {};
                }
            });


        })()
    </script>

</body>

</html>